<?php
namespace Admin\Controller;
use Common\Controller\BaseController;
use Common\Controller\DataController;

class IndexController extends BaseController
{
    
    public function _initialize(){
        parent::_initialize();
        self::$_action_block = 10;
        $this->assign('block',self::$_action_block);
    }
    public function index(){
        $this->display('index');
    }
    /**
     * 查看原图
     */
    public function viewImage(){
        parent::viewImage();
        $this->display('view_image');
    }
    public function export(){

        self::$_action_block = 9;
        $this->assign('block',self::$_action_block);
        $this->assign('type',1);
        $m = new DataController();
        if(IS_POST){
            $action = I('post.action','','htmlspecialchars');
            $where['s'] = I('post.stime',time(),'strtotime');
            $where['s'] = I('post.etime',time(),'strtotime');
            $m->export($action,$where);
            exit;
        }
        $this->assign('action',$m::$action);
        $this->assign('stime',date('Y-m-d',time()-60*60*24*100));
        $this->assign('etime',date('Y-m-d',time()));
        $this->display('export');
    }
  
}